package com.overlook.somniferous.user.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 用户表
 */
@ApiModel(description="用户表")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "`user`")
public class User implements Serializable {
    @TableId(value = "id", type = IdType.INPUT)
    @ApiModelProperty(value="")
    @Size(max = 100,message = "最大长度要小于 100")
    @NotBlank(message = "不能为空")
    private String id;

    /**
     * 姓名
     */
    @TableField(value = "`name`")
    @ApiModelProperty(value="姓名")
    @Size(max = 100,message = "姓名最大长度要小于 100")
    @NotBlank(message = "姓名不能为空")
    private String name;

    /**
     * 手机号
     */
    @TableField(value = "phone")
    @ApiModelProperty(value="手机号")
    @Size(max = 100,message = "手机号最大长度要小于 100")
    @NotBlank(message = "手机号不能为空")
    private String phone;

    /**
     * 邮箱
     */
    @TableField(value = "email")
    @ApiModelProperty(value="邮箱")
    @Size(max = 100,message = "邮箱最大长度要小于 100")
    private String email;

    /**
     * 注册时间
     */
    @TableField(value = "register_time")
    @ApiModelProperty(value="注册时间")
    @Size(max = 100,message = "注册时间最大长度要小于 100")
    private String registerTime;

    /**
     * 创建时间
     */
    @TableField(value = "created_time")
    @ApiModelProperty(value="创建时间")
    @Size(max = 200,message = "创建时间最大长度要小于 200")
    private String createdTime;

    /**
     * 修改时间
     */
    @TableField(value = "update_time")
    @ApiModelProperty(value="修改时间")
    @Size(max = 100,message = "修改时间最大长度要小于 100")
    private String updateTime;

    /**
     * 创建人
     */
    @TableField(value = "created_by")
    @ApiModelProperty(value="创建人")
    @Size(max = 100,message = "创建人最大长度要小于 100")
    private String createdBy;

    /**
     * 更新人
     */
    @TableField(value = "update_by")
    @ApiModelProperty(value="更新人")
    @Size(max = 100,message = "更新人最大长度要小于 100")
    private String updateBy;

    /**
     * 密码
     */
    @TableField(value = "`password`")
    @ApiModelProperty(value="密码")
    @Size(max = 100,message = "密码最大长度要小于 100")
    @NotBlank(message = "密码不能为空")
    private String password;

    private static final long serialVersionUID = 1L;
}